-- GENERATED SPELL FOR [Shadowmoon Chosen] --


function spell0_22084(pUnit, Event) --@Uppercut,n/a--
pUnit:FullCastSpellOnTarget(10966,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_22084', 586, 1)
end

function spell1_22084(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(38619,pUnit)
pUnit:RegisterEvent('Sorts_22084', 635, 1)
end

function spell2_22084(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(38618,pUnit)
pUnit:RegisterEvent('Sorts_22084', 2000, 1)
end

function Sorts_22084(pUnit, Event)
local choix_sorts_22084 = math.random(0, 2)
if choix_sorts_22084 == 0 then
pUnit:RegisterEvent('spell0_22084', 1, 1)
end
if choix_sorts_22084 == 1 then
pUnit:RegisterEvent('spell1_22084', 1, 1)
end
if choix_sorts_22084 == 2 then
pUnit:RegisterEvent('spell2_22084', 1, 1)
end
end

function mob22084_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_22084', math.random(1500, 3000), 1)
end

function mob22084_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22084_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22084_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(22084, 1, 'mob22084_Action')
RegisterUnitEvent(22084, 2, 'mob22084_Leave')
RegisterUnitEvent(22084, 3, 'mob22084_Kill')
RegisterUnitEvent(22084, 4, 'mob22084_Die')
